package cn.gdk.gaodekecc.exception;

import lombok.Getter;

@Getter
public enum GlobalExceptionCodeEunm  {
    SUCCESS("成功", "1"),
    SERVICE_ERROR("失败", "-1"),
    LSSUE("库存不够","2"),
    //公共异常1xxx
    PARAMETER_IS_NULL("参数为空","1001"),
    PARAMETER_ILLEGAL("参数不合规","1002"),
    PARAMETER_CHECK_FAILURE("JSR-参数校验不合格","1003")
    // system异常2xxx

    ;
    // 异常码
    private String code;

    // 异常信息
    private String message;

    private GlobalExceptionCodeEunm(String message,String code) {
        this.code = code;
        this.message = message;
    }
    @Override
    public String toString() {
        return "GlobalExceptionCodeEunm{" +
                "code='" + code + '\'' +
                ", message='" + message + '\'' +
                '}';
    }
}
